package pl.prv.polanie.client.model;

import pl.prv.polanie.client.service.PlannerService;
import pl.prv.polanie.client.service.PlannerServiceAsync;

import com.google.gwt.core.client.GWT;
import com.google.gwt.user.client.rpc.ServiceDefTarget;

public class ServiceHolder {

	public static PlannerServiceAsync get() {
		PlannerServiceAsync plannerService = (PlannerServiceAsync) GWT.create(PlannerService.class);
		ServiceDefTarget endpoint = (ServiceDefTarget) plannerService;
		String moduleRelativeURL = GWT.getModuleBaseURL() + "PlannerService";
		endpoint.setServiceEntryPoint(moduleRelativeURL);
		
		return plannerService;
	}
	
	
}
